package com.asiainfo.controller;

import com.asiainfo.annotation.Autowired;
import com.asiainfo.annotation.Controller;
import com.asiainfo.annotation.RequestMapping;
import com.asiainfo.annotation.RequestParam;
import com.asiainfo.service.impl.LoginService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller
@RequestMapping(value = "/ym")
public class LoginController
{
    @Autowired
    private LoginService loginService;

    /**
     * 显示欢迎名字
     * @param request
     * @param response
     */
    @RequestMapping(value = "/welcome")
    public void welcome(HttpServletRequest request, HttpServletResponse response) throws IOException {

        response.setStatus(200);
        response.setCharacterEncoding("utf-8");
        response.setContentType("application/json;charset=UTF-8");
        response.getWriter().write("do well!");
    }

}
